\(\int \frac {A+B x^2}{x (a+b x^2)^{3/2}} \, dx\) [576]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 53 \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=\frac {A b-a B}{a b \sqrt {a+b x^2}}-\frac {A \text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}} \]

[Out]

-A*arctanh((b*x^2+a)^(1/2)/a^(1/2))/a^(3/2)+(A*b-B*a)/a/b/(b*x^2+a)^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {457, 79, 65, 214} \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=\frac {A b-a B}{a b \sqrt {a+b x^2}}-\frac {A \text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}} \]

[In]

Int[(A + B*x^2)/(x*(a + b*x^2)^(3/2)),x]

[Out]

(A*b - a*B)/(a*b*Sqrt[a + b*x^2]) - (A*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/a^(3/2)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {A+B x}{x (a+b x)^{3/2}} \, dx,x,x^2\right ) \\ & = \frac {A b-a B}{a b \sqrt {a+b x^2}}+\frac {A \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,x^2\right )}{2 a} \\ & = \frac {A b-a B}{a b \sqrt {a+b x^2}}+\frac {A \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{a b} \\ & = \frac {A b-a B}{a b \sqrt {a+b x^2}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00 \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=\frac {A b-a B}{a b \sqrt {a+b x^2}}-\frac {A \text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}} \]

[In]

Integrate[(A + B*x^2)/(x*(a + b*x^2)^(3/2)),x]

[Out]

(A*b - a*B)/(a*b*Sqrt[a + b*x^2]) - (A*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/a^(3/2)

Maple [A] (verified)

Time = 2.79 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.08

method result size
pseudoelliptic \(-\frac {A \,\operatorname {arctanh}\left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {a}}\right ) b \sqrt {b \,x^{2}+a}-A b \sqrt {a}+B \,a^{\frac {3}{2}}}{a^{\frac {3}{2}} \sqrt {b \,x^{2}+a}\, b}\) \(57\)
default \(-\frac {B}{b \sqrt {b \,x^{2}+a}}+A \left (\frac {1}{a \sqrt {b \,x^{2}+a}}-\frac {\ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{a^{\frac {3}{2}}}\right )\) \(61\)

[In]

int((B*x^2+A)/x/(b*x^2+a)^(3/2),x,method=_RETURNVERBOSE)

[Out]

-(A*arctanh((b*x^2+a)^(1/2)/a^(1/2))*b*(b*x^2+a)^(1/2)-A*b*a^(1/2)+B*a^(3/2))/a^(3/2)/(b*x^2+a)^(1/2)/b

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 167, normalized size of antiderivative = 3.15 \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=\left [\frac {{\left (A b^{2} x^{2} + A a b\right )} \sqrt {a} \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - 2 \, {\left (B a^{2} - A a b\right )} \sqrt {b x^{2} + a}}{2 \, {\left (a^{2} b^{2} x^{2} + a^{3} b\right )}}, \frac {{\left (A b^{2} x^{2} + A a b\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) - {\left (B a^{2} - A a b\right )} \sqrt {b x^{2} + a}}{a^{2} b^{2} x^{2} + a^{3} b}\right ] \]

[In]

integrate((B*x^2+A)/x/(b*x^2+a)^(3/2),x, algorithm="fricas")

[Out]

[1/2*((A*b^2*x^2 + A*a*b)*sqrt(a)*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - 2*(B*a^2 - A*a*b)*sqrt
(b*x^2 + a))/(a^2*b^2*x^2 + a^3*b), ((A*b^2*x^2 + A*a*b)*sqrt(-a)*arctan(sqrt(-a)/sqrt(b*x^2 + a)) - (B*a^2 -
A*a*b)*sqrt(b*x^2 + a))/(a^2*b^2*x^2 + a^3*b)]

Sympy [A] (verification not implemented)

Time = 3.86 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.32 \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=\begin {cases} \frac {2 \left (\frac {A b \operatorname {atan}{\left (\frac {\sqrt {a + b x^{2}}}{\sqrt {- a}} \right )}}{2 a \sqrt {- a}} - \frac {- A b + B a}{2 a \sqrt {a + b x^{2}}}\right )}{b} & \text {for}\: b \neq 0 \\\frac {A \log {\left (B x^{2} \right )} + B x^{2}}{2 a^{\frac {3}{2}}} & \text {otherwise} \end {cases} \]

[In]

integrate((B*x**2+A)/x/(b*x**2+a)**(3/2),x)

[Out]

Piecewise((2*(A*b*atan(sqrt(a + b*x**2)/sqrt(-a))/(2*a*sqrt(-a)) - (-A*b + B*a)/(2*a*sqrt(a + b*x**2)))/b, Ne(
b, 0)), ((A*log(B*x**2) + B*x**2)/(2*a**(3/2)), True))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.91 \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=-\frac {A \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{a^{\frac {3}{2}}} + \frac {A}{\sqrt {b x^{2} + a} a} - \frac {B}{\sqrt {b x^{2} + a} b} \]

[In]

integrate((B*x^2+A)/x/(b*x^2+a)^(3/2),x, algorithm="maxima")

[Out]

-A*arcsinh(a/(sqrt(a*b)*abs(x)))/a^(3/2) + A/(sqrt(b*x^2 + a)*a) - B/(sqrt(b*x^2 + a)*b)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98 \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=\frac {A \arctan \left (\frac {\sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a} - \frac {B a - A b}{\sqrt {b x^{2} + a} a b} \]

[In]

integrate((B*x^2+A)/x/(b*x^2+a)^(3/2),x, algorithm="giac")

[Out]

A*arctan(sqrt(b*x^2 + a)/sqrt(-a))/(sqrt(-a)*a) - (B*a - A*b)/(sqrt(b*x^2 + a)*a*b)

Mupad [B] (verification not implemented)

Time = 5.61 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.94 \[ \int \frac {A+B x^2}{x \left (a+b x^2\right )^{3/2}} \, dx=\frac {A}{a\,\sqrt {b\,x^2+a}}-\frac {B}{b\,\sqrt {b\,x^2+a}}-\frac {A\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{a^{3/2}} \]

[In]

int((A + B*x^2)/(x*(a + b*x^2)^(3/2)),x)

[Out]

A/(a*(a + b*x^2)^(1/2)) - B/(b*(a + b*x^2)^(1/2)) - (A*atanh((a + b*x^2)^(1/2)/a^(1/2)))/a^(3/2)